package com.eastfair.venueservice.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.mapper.SuperMapper;
import com.eastfair.venueservice.dto.ServiceInventoryOutFlowQuery;
import com.eastfair.venueservice.entity.ServiceInventory;
import com.eastfair.venueservice.entity.ServiceInventoryOutFlow;

import com.eastfair.venueservice.vo.ServiceInventoryOutFlowVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * 服务库存出库流水记录
 * </p>
 *
 * @author linan
 * @date 2022-09-19
 */
@Repository
public interface ServiceInventoryOutFlowMapper extends SuperMapper<ServiceInventoryOutFlow> {

    /**
     * 查询出库记录
     * @param serviceInventoryOutFlowQueryPage
     * @param wrapper
     * @return
     */
    Page<ServiceInventoryOutFlowVO> queryOutFlowList(Page<ServiceInventoryOutFlowQuery> serviceInventoryOutFlowQueryPage,@Param(Constants.WRAPPER) QueryWrapper<ServiceInventory> wrapper);

    /**
     * 统计主场服务分类出库量.
     *
     * @param wrapper the wrapper
     * @return the list
     */
    List<ServiceInventoryOutFlowVO> countServiceCategoryOutFlow(@Param(Constants.WRAPPER) QueryWrapper<ServiceInventoryOutFlow> wrapper);

    /**
     * 统计主场服务出库量.
     *
     * @param wrapper the wrapper
     * @return the list
     */
    List<ServiceInventoryOutFlowVO> countServiceOutFlow(@Param(Constants.WRAPPER) QueryWrapper<ServiceInventoryOutFlow> wrapper);
}
